KFbxLayerElementUserData Class Reference

#include <kfbxlayer.h>
Inheritance diagram for KFbxLayerElementUserData:
Inheritance graph
[legend]

List of all members.


Detailed Description

Layer element for mapping custom user data to a geometry.

This layer element is different from the other types of layer elements in that it has multiple direct arrays. There is one array for each user data attribute. Each array is indexed by the index array.

Definition at line 1493 of file kfbxlayer.h.


Public Member Functions

KFbxLayerElementArrayTemplate
< void * > * 
GetDirectArrayVoid (int pIndex, bool *pStatus=NULL)
  Returns the direct array with the specified attribute index.
KFbxLayerElementArrayTemplate
< void * > const * 
GetDirectArrayVoid (int pIndex, bool *pStatus=NULL) const
  Returns the direct array with the specified attribute index.
KFbxLayerElementArrayTemplate
< void * > * 
GetDirectArrayVoid (const char *pName, bool *pStatus=NULL)
  Returns the direct array with the specified attribute name.
KFbxLayerElementArrayTemplate
< void * > const * 
GetDirectArrayVoid (const char *pName, bool *pStatus=NULL) const
  Returns the direct array with the specified attribute name.
KFbxDataType  GetDataType (int pIndex) const
  Returns the data type for the specified index.
KFbxDataType  GetDataType (const char *pName) const
  Returns the specified attribute data type.
const char *  GetDataName (int pIndex) const
  Returns the attribute name at the specified index.
void  ResizeAllDirectArrays (int pSize)
  Resizes all direct arrays to the specified size.
void  RemoveFromAllDirectArrays (int pIndex)
  Removes a single element at pIndex from every direct array.
int  GetArrayCount (int pIndex) const
  Returns the direct array count for the attribute at pIndex.
int  GetId () const
  Queries the this layer element's ID.
int  GetDirectArrayCount () const
  Returns this layer element's direct array count.
KFbxLayerElementUserData operator= (KFbxLayerElementUserData const &pOther)
  Assignment operator which performs a deep copy.
bool  Clear ()
  Removes all data from this layer element.
virtual int  MemorySize () const
  Queries the amount of memory used by this object as well as its content.

Static Public Member Functions

static KFBXNEW_DECLARE_FRIEND
KFbxLayerElementUserData
Create (KFbxLayerContainer *pOwner, char const *pName, int pId, KArrayTemplate< KFbxDataType > &pDataTypes, KArrayTemplate< const char * > &pDataNames)
  Allocation method.
static KFbxLayerElementUserData Create (KFbxLayerContainer *pOwner, KFbxLayerElementUserData const &pOther)
  Allocation method.

Member Function Documentation

static KFBXNEW_DECLARE_FRIEND KFbxLayerElementUserData* Create ( KFbxLayerContainer pOwner,
char const *  pName,
int  pId,
KArrayTemplate< KFbxDataType > &  pDataTypes,
KArrayTemplate< const char * > &  pDataNames  
) [static]

Allocation method.

Parameters:
pOwner  The owner of this layer element.
pName  The layer element name.
pId  The layer element ID.
pDataTypes  Attribute data types of this layer element, one direct array is allocated for each Attribute data type.
pDataNames  Attribute names of this layer element.
Returns:
A pointer to the layer element or NULL if creation fails.
Remarks:
Only "bool", "int", "float" and "double" are supported.

static KFbxLayerElementUserData* Create ( KFbxLayerContainer pOwner,
KFbxLayerElementUserData const &  pOther  
) [static]

Allocation method.

Parameters:
pOwner  The owner of this layer element.
pOther  Other layer element from which to copy.
Returns:
A pointer to the layer element or NULL if creation fails.

KFbxLayerElementArrayTemplate<void*>* GetDirectArrayVoid ( int  pIndex,
bool *  pStatus = NULL  
) [inline]

Returns the direct array with the specified attribute index.

Parameters:
pIndex  Specified attribute index.
pStatus  A flag to indicate whether the direct array is returned successfully or not.
Returns:
The specified attribute's direct array.

Definition at line 1521 of file kfbxlayer.h.

References KFbxLayerElementTemplate::GetDirectArray(), K_ASSERT_MSG_NOW, and NULL.

Referenced by KFbxGetDirectArray().

KFbxLayerElementArrayTemplate<void*> const* GetDirectArrayVoid ( int  pIndex,
bool *  pStatus = NULL  
) const [inline]

Returns the direct array with the specified attribute index.

Parameters:
pIndex  Specified attribute index.
pStatus  A flag to indicate whether the direct array is returned successfully or not.
Returns:
The specified attribute's direct array.

Definition at line 1541 of file kfbxlayer.h.

References KFbxLayerElementTemplate::GetDirectArray(), K_ASSERT_MSG_NOW, and NULL.

KFbxLayerElementArrayTemplate<void *>* GetDirectArrayVoid ( const char *  pName,
bool *  pStatus = NULL  
) [inline]

Returns the direct array with the specified attribute name.

Parameters:
pName  Specified attribute name.
pStatus  A flag to indicate whether the direct array is returned successfully or not.
Returns:
The specified attribute's direct array.

Definition at line 1562 of file kfbxlayer.h.

References NULL.

KFbxLayerElementArrayTemplate<void *> const* GetDirectArrayVoid ( const char *  pName,
bool *  pStatus = NULL  
) const [inline]

Returns the direct array with the specified attribute name.

Parameters:
pName  Specified attribute name.
pStatus  A flag to indicate whether the direct array is returned successfully or not.
Returns:
The specified attribute's direct array.

Definition at line 1580 of file kfbxlayer.h.

References NULL.

KFbxDataType GetDataType ( int  pIndex  )  const [inline]

Returns the data type for the specified index.

Parameters:
pIndex  The index of the attribute being queried
Returns:
The data type, or DTNone if pIndex is out of range

Definition at line 1597 of file kfbxlayer.h.

References DTNone.

KFbxDataType GetDataType ( const char *  pName  )  const [inline]

Returns the specified attribute data type.

Parameters:
pName  The name of the attribute being queried
Returns:
The data type, or DTNone if no attribute has the given name

Definition at line 1609 of file kfbxlayer.h.

References DTNone.

const char* GetDataName ( int  pIndex  )  const [inline]

Returns the attribute name at the specified index.

Parameters:
pIndex  Attribute index
Returns:
The name, or NULL if pIndex is out of range.

Definition at line 1626 of file kfbxlayer.h.

References NULL.

void ResizeAllDirectArrays ( int  pSize  )  [inline]

Resizes all direct arrays to the specified size.

Parameters:
pSize  The new size of the direct arrays.

Definition at line 1637 of file kfbxlayer.h.

References eBOOL1, eDOUBLE1, eFLOAT1, eINTEGER1, KFbxLayerElementTemplate::GetDirectArray(), and K_ASSERT_MSG_NOW.

void RemoveFromAllDirectArrays ( int  pIndex  )  [inline]

Removes a single element at pIndex from every direct array.

Parameters:
pIndex  The index of the element to be removed.

Definition at line 1659 of file kfbxlayer.h.

References eBOOL1, eDOUBLE1, eFLOAT1, eINTEGER1, KFbxLayerElementTemplate::GetDirectArray(), and K_ASSERT_MSG_NOW.

int GetArrayCount ( int  pIndex  )  const [inline]

Returns the direct array count for the attribute at pIndex.

Parameters:
pIndex  The attribute index
Returns:
The specified attribute's direct array count.

Definition at line 1682 of file kfbxlayer.h.

References eBOOL1, eDOUBLE1, eFLOAT1, eINTEGER1, KFbxLayerElementTemplate::GetDirectArray(), and K_ASSERT_MSG_NOW.

int GetId (  )  const [inline]

Queries the this layer element's ID.

Returns:
The ID expressed as an int

Definition at line 1706 of file kfbxlayer.h.

int GetDirectArrayCount (  )  const [inline]

Returns this layer element's direct array count.

Returns:
The direct array count expressed as an int.
Remarks:
This count should be equal to the count of user data attributes.

Definition at line 1712 of file kfbxlayer.h.

References KFbxLayerElementTemplate::GetDirectArray().

Referenced by operator=().

KFbxLayerElementUserData& operator= ( KFbxLayerElementUserData const &  pOther  )  [inline]

bool Clear (  )  [inline, virtual]

Removes all data from this layer element.

Returns:
True always

Reimplemented from KFbxLayerElementTemplate< void * >.

Definition at line 1772 of file kfbxlayer.h.

References KFbxLayerElementTemplate::Clear(), FbxSdkDelete(), KFbxLayerElementTemplate::GetDirectArray(), KFBX_SAFE_DELETE_PTR, and NULL.

virtual int MemorySize (  )  const [inline, virtual]

Queries the amount of memory used by this object as well as its content.

It does not consider the content pointed.

Returns:
The amount of memory used.

Definition at line 1801 of file kfbxlayer.h.

KFbxLayerElementUserData KFbxLayerElementUserData KFbxLayerElementUserData KFbxLayerElementUserData KFbxLayerElementUserData KFbxLayerElementUserData KFbxLayerElementUserData KFbxLayerElementUserData KFbxLayerElementUserData KFbxLayerElementUserData
KFbxLayerElementUserData KFbxLayerElementUserData KFbxLayerElementUserData KFbxLayerElementUserData KFbxLayerElementUserData KFbxLayerElementUserData KFbxLayerElementUserData KFbxLayerElementUserData KFbxLayerElementUserData KFbxLayerElementUserData